
var listdata = [];

var vm = new Vue({
    el: '#cards',
    data: {
        listdata: listdata
    },
    methods:{
        insert:function (data) {
            // 注入数据
            vm.listdata = data
        },
    }
});


mui.ready(function () {
    // 新增银行卡
    mui('.mui-button-fixed').on('tap','#add',function () {
        location.href="cards_add.html";
    })
    // 删除地址
    var info = document.getElementById("info");
    mui('.mui-popover-action ').on('tap', 'li>a', function() {
        var a = this,
            parent;
        //根据点击按钮，反推当前是哪个actionsheet
        for (parent = a.parentNode; parent != document.body; parent = parent.parentNode) {
            if (parent.classList.contains('mui-popover-action')) {
                break;
            }
        }
        //关闭actionsheet
        mui('#' + parent.id).popover('toggle');
       var tag =  this.getAttribute('tag');
       console.log('tag',tag)
        // info.innerHTML = "你刚点击了\"" + a.innerHTML + "\"按钮";
        if(tag==1){
            mui.alert("执行删除")
        }else{
            mui.alert("执行取消")
        }
    })
})